<#import "/spring.ftl" as s/>
<@override name="main">
<div id="account_form_div">
    <form action="<@s.url '/account/save'/>" id="account_form" method="post">
        <table art="form" columns="120,*" autoLabel="true" rightAlign="true" colon="true">
            <tr>
                <td>
                    <input type="hidden" id="account_id" name="id" value="${account.id}">
                    <input type="hidden" id="account_login" name="login" value="${account.login?html}">
                    <label art='label' required='true'><@s.message "account.from.login"/></label>
				</td>
                <td>
					${account.login}
				</td>
            </tr>
            <tr>
                <td>
                    <label for="name" art='label' required='true'><@s.message "account.from.name"/></label>
                <td>
                    <input id="name" name="name" required='true'   display="right" validType="length[0,30]"
                           requiredMsg="<@s.message "account.edit.login.required.error.tip"/>"
                           errorMsg="<@s.message "account.edit.name.error.tip"/>"
                           value="${account.name?html}"
                           type="text" art="textbox"
                           emptyText="<@s.message "account.from.name"/>" required="true"/>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="mail" art='label' required='true'><@s.message "account.from.mail"/></label>
                <td>
                    <input id="mail" name="mail" type="text" art="textbox"  validType="length[0,30]"    display="right"
                           requiredMsg="<@s.message "account.edit.mail.required.error.tip"/>"
                           errorMsg="<@s.message "account.edit.mail.error.tip"/>"
                           value="${account.mail?html}"
                           emptyText="<@s.message "account.from.mail"/>" required="true"/>
                </td>
            </tr>
            <tr>
                <td>
                    <label art='label' required='true'><@s.message "account.from.lable.last.logintime"/></label>
                </td>
                <td>
					<#if account.lastLogin??>
						${account.lastLogin?string("yyyy-MM-dd HH:mm:ss")}
					</#if>

                </td>
            </tr>
            <tr>
			<td></td>
                <td>
                    <button type="submit" icon="account_save">
                        <span><span> <@s.message "operation.save"/> </span></span>
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>

</@override>
<@override name="scripts">
<script type="text/javascript">
    $(document).ready(function () {
        cdms.common.form_submit('account_form', {}, function (data) {
            cdms.common.show_ajax_msg(data);
        });
    });
</script>
</@override>
<@extends name="/common/layout.ftl" current="settings" title='home.account.updateInfo'></@extends>